package com.liyao.windowtest4.Utils;

import com.liyao.windowtest4.pojo.torqueRow;
import com.liyao.windowtest4.pojo.wrenchRow;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;

/**
 * @program: windowtest4
 * @description:
 * @author: liu yan
 * @create: 2024-10-24 19:23
 */
public class SharedModel {
    private static SharedModel instance;
    private ObservableList<torqueRow> tableData;

    private ObservableList<wrenchRow> dataWrench;

    private SharedModel() {
        tableData = FXCollections.observableArrayList();
        dataWrench =  FXCollections.observableArrayList();
    }

    public static SharedModel getInstance() {
        if (instance == null) {
            instance = new SharedModel();
        }
        return instance;
    }

    public ObservableList<torqueRow> getTableData() {
        return tableData;
    }

    public ObservableList<wrenchRow> getWrenchTableData() {
        return dataWrench;
    }

    public void setTableData(ObservableList<torqueRow> tableData) {
        this.tableData = tableData;
    }
}
